<div align="center">
<b class="big"><?=$T['Manual Topics'];?></b>
<table border="0" summary="" width="650">
<? // print all pages and get help (if it exists) from the db
global $menu;
$menu = array();
load_cached_file('menu.default.phps', 'menu');
$menudata = array('userdata' => $userdata, 'personaldata' => $personaldata, 'domaindata' => $domaindata, 'resellerdata' => $resellerdata, 'lang' => $lang);
call_hook('web:menu', $menudata);
$i = 0;
do {

	// print current page
	?>
		<tr>
			<td class="row1">&raquo; <?=$T['menu'][current($menu[$cp])];?></td>
		</tr>
	<?
	// search for help
	$dbp = mysql_query("SELECT id, question, answer FROM help WHERE (panel='$cp' or panel='any')AND page='".current($menu[$cp])."' AND lang='".$userdata['lang']."' ORDER BY listorder");
	
	if (mysql_num_rows($dbp)) { 
		
		// if it exists
		echo "<tr><td class='small'>\n";
		
		while($man = mysql_fetch_array($dbp)) {
			++$i;
			?>
		&nbsp;&nbsp;&nbsp;&raquo;&nbsp;<a href="<?=($current_url.'&data[mid]='.$man['id']);?>"><?=$man['question'];?></a><br>
			<? // if its being read right now (i.e mid == $man['id'])
			if ($data['mid'] == $man['id']) { ?>
			<blockquote>
			<span class="normal"><?=$man['answer'];?></span><br>
			</blockquote>
			<? } // anyway, week listing
		}
		echo "</td></tr>\n";
	}
} while (next($menu[$cp]));
?>
<tr><td class='normal' align="right"><b><?=$i;?></b> <?=$T['Manual Topics Displayed'];?></td></tr>
</table>
<br>
</div>
